package com.kkd.kkdapp.utils;

import com.kkd.kkdapp.activity.ForTenderActivity;
import com.kkd.kkdapp.activity.RechargeActivity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;

public class AuthenticationUtils {

	public static void getAuthenticationResult(Context context, int flag,
			Class<?> cls) {
		Intent intent;
		if (PreferenceUtils.getInstance().getAutonym(context) == 1) {
			/********************** 实名验证 *******************************************/
			if (PreferenceUtils.getInstance().getBoundBankCard(context) == 1) {
				/********************** 绑定银行卡 *******************************************/
				intent = new Intent(context, cls);
				context.startActivity(intent);
			} else {
				/********************** 未绑定银行卡 *******************************************/
				intent = new Intent(context, ForTenderActivity.class);
				intent.putExtra("enterTypeFlag", flag);
				context.startActivity(intent);
			}
		} else {
			/********************** 未实名验证 *******************************************/
			intent = new Intent(context, ForTenderActivity.class);
			intent.putExtra("enterTypeFlag", flag);
			context.startActivity(intent);
		}
	}

}
